import { get, post, postForm } from "../request";

const prefix = '/ytdzdt-server'


// 种植烟田地块
export function getYtdkStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/ytdk_statistics",
    data
  );
}
// 基本烟田田块
export function getYtdkMjRegionApi(data) {
  return post(
    "/geoserver-open/rest/stat/ytdk_mj_region",
    data
  );
}

// 基础设施系列接口
// 提灌站
export function getTgzStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/tgz_statistics",
    data
  );
}
// 机井
export function getJjStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/jj_statistics",
    data
  );
}
// 水窖
export function getSjStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/sj_statistics",
    data
  );
}
// 塘坝
export function getTbStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/tb_statistics",
    data
  );
}

// 管网
export function getGwStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/gw_statistics",
    data
  );
}

// 水池
export function getScStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/sc_statistics",
    data
  );
}

// 沟渠
export function getGqStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/gq_statistics",
    data
  );
}

// 水源工程
export function getSygcStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/sygc_statistics",
    data
  );
}

// 烟叶调制设施
export function getYytzssStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/yytzss_statistics",
    data
  );
}

// 育苗设施
export function getYmssStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/ymss_statistics",
    data
  );
}

// 田间道路
export function getTjdlStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/tjdl_statistics",
    data
  );
}

// 烟草农用机械设施
export function getNyjxStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/ycnyjxcfss_statistics",
    data
  );
}

// 土地整理
export function getTdzlStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/tdzl_statistics",
    data
  );
}

// 组织机构
export function getZzjgStatisticsApi(data) {
  return post(
    "/geoserver-open/rest/stat/zzjg_statistics",
    data
  );
}
// 烟叶站点
export function getZzjgyyzdStatisticsApi(data) {
  return post("/geoserver-open/rest/stat/zzjg_yyzd_statistics", data);
}

// 合作社
export function getZzjghzsStatisticsApi(data) {
  return post("/geoserver-open/rest/stat/zzjg_hzs_statistics", data);
}
// 复烤厂
export function getZzjgfkjgcStatisticsApi(data) {
  return post("/geoserver-open/rest/stat/zzjg_fkjgc_statistics", data);
}
// 卷烟厂
export function getZzjgjyscqyStatisticsApi(data) {
  return post("/geoserver-open/rest/stat/zzjg_jyscqy_statistics", data);
}
// 种植烟草品种排名
export function leafVarietyRank(data) {
  return post("/geoserver-open/rest/query/ytdk_statistics", data);
}

// 种植土壤排名
export function soilTypeRank(data) {
  return post("/geoserver-open/rest/query/jbyttk_type_statistics", data);
}
// 获取字典
export function getDicTree(data) {
  return postForm(prefix + "/TaskDomain/TaskService/getDicTree/v1", data);
}


// 专题分析
export function planAnalysisApi(data) {
  return post(prefix + "/MapDomain/BasicAnalysisService/PlanAnalysis/v1", data);
}

// 灾害预警分析
export function warnAnalysisApi(data) {
  return post(prefix + "/MapDomain/BasicAnalysisService/getRiskWarnAnalysis/v1", data);
}

// 灾害面积预警分析
export function areaAnalysisApi(data) {
  return post(prefix + "/MapDomain/BasicAnalysisService/getRiskAreaAnalysis/v1", data);
}

// 海拔分析
export function altitudeAnalysisApi(data) {
  return post(prefix + "/MapDomain/BasicAnalysisService/getAltitudeAnalysis/v1", data);
}

// 生成临时样式
export function altitudeAnalysisMapApi(data) {
  return post(`/layerService/mapserver/styleInfo/tmp/${data.styleId}`, data);
}

// 数据分析模块
export function statFindAllApi() {
  return get('/geoserver-open/rest/manage/stat/findAll');
}

export function findDetailApi(data) {
  return get('/geoserver-open/rest/manage/stat/findDetail', data);
}

export function customStaticsApi(data) {
  return post('/geoserver-open/rest/stat/customStatics', data);
}

// 海拔变化
export function getAltitudeLineAnalysis(data) {
  return post(prefix + "/MapDomain/BasicAnalysisService/getAltitudeLineAnalysis/v1", data);
}

